#ifndef WORK_WINDOW_H
#define WORK_WINDOW_H
#pragma once

#include "devicemonitor.h"
#include "historypage.h"
#include "systemsettingspage.h"
#include "serialtoolwidget.h"
#include "ems_summary.h"
#include "energydashboard.h"

#include <QMainWindow>
#include <QMenu>
#include <QAction>
#include<QStackedWidget>
#include<QVBoxLayout>
#include<QToolBar>
#include<QButtonGroup>
#include<QTimer>
#include <QCloseEvent>



class Work_Window : public QMainWindow
{
    Q_OBJECT
public:
    explicit Work_Window(QWidget *parent = nullptr);
    ~Work_Window();
    void createPage(int index, const QString &name, const QColor &color);
    void closeEvent(QCloseEvent *event);
    void update_authority(QString& privileges);
    //登录状态，及登录的权限
    QString privileges;
    DeviceMonitor*monitor;
    HistoryPage * history_page;
    SystemSettingsPage * system_settings_page;
    SerialToolWidget* serial_tool_widget;
private:
    // void closeEvent(QCloseEvent*);
    QStackedWidget *stackedWidget;

    QToolBar *toolBar;
    // QToolBar *zoomTool;
    // QToolBar *doToolBar;
    // QToolBar *fileTool;                          	//工具栏
    QButtonGroup *buttonGroup;
    //ComTool_Widget * comtool_widget;



    QTimer *data_updater;

signals:

};

#endif // WORK_WINDOW_H
